#pragma once
#include <iostream>
#include <string.h>
#include <string>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <functional>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include<pthread.h>
#define CONV(addr) ((struct sockaddr *)&addr)
enum ExitCode
{
    OK = 0,
    SOCKET_ERR,
    BIND_ERR,
    LISTEN_ERR,
    USAGE_ERR,
    CONNECT_ERR,
    FORK_ERR,
    ACCEPT_ERR,
    OPEN_ERR
};
// 用来防止拷贝的
class nocopy
{
public:
    nocopy() {}
    ~nocopy() {}
    nocopy operator=(const nocopy &n) = delete;
    nocopy(const nocopy &n) = delete;
};
